package com.atguigu.tingshu.model.album;

import com.atguigu.tingshu.model.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.io.Serial;


/**
 * 专辑-属性-属性值 三表关系表
 * @author sun
 */
@EqualsAndHashCode(callSuper = true)
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@TableName("album_attribute_value")
public class AlbumAttributeValue extends BaseEntity {

	@Serial
	private static final long serialVersionUID = 1L;
	/**
	 * 专辑id
	 */
	@TableField("album_id")
	private Long albumId;
	/**
	 * 属性id
	 */
	@NotNull(message = "属性id不能为空")
	@TableField("attribute_id")
	private Long attributeId;
	/**
	 * 属性值id
	 */
	@TableField("value_id")
	@NotNull(message = "属性值id不能为空")
	private Long valueId;
	/**
	 * 属性名称
	 */
	@TableField(exist = false)
	private String attributeName;
	/**
	 * 属性值名称
	 */
	@TableField(exist = false)
	private String valueName;

}